const mongoose = require("mongoose");
const schema = new mongoose.Schema({
  user: { type: String, index: true, unique: true, required: true },
  time: { type: String, required: true },
  passWord: {
    type: String,
    required: true,
    select:false,
    set(val) {
      return require("bcrypt").hashSync(val,10);
    }
  },
})

module.exports = mongoose.model("User", schema)